Method and system for the calibration of a computer vision system

ABSTRACT

The invention relates to the calibration of a three-dimensional computer vision system. The method and system are implemented using a polygonal plate-like calibration piece ( 21 ) made of a material whose properties do not change significantly with changes in conditions or with time. The edges of the calibration piece ( 21 ) used have different lengths and the piece is provided with circular focusing marks ( 22 ) placed at its vertices.

This application is a 371 of PCT/FI02/00929 filed on Nov. 20, 2002,published on May 30, 2003 under publication number WO 03/044458 A1 whichclaims priority benefits from Finnish patent application number FI20012296 filed Nov. 23, 2001.

FIELD OF THE INVENTION

The present invention relates to three-dimensional camera measurement.The present invention concerns a method and system for the calibrationof a computer vision system by using a calibration piece.

BACKGROUND OF THE INVENTION

Computer vision systems are based on information obtained from variousmeasuring devices. Information can be measured using e.g. a laserdevice, a measuring head or via recognition from an image. Theinformation obtained can be utilized e.g. in quality control systems,where, on the basis of this information, it is possible to determinee.g. the correctness of shape of an object, coloring errors or thenumber of knots in sawn timber.

A computer vision system is generally formed from cameras. Traditionalcomputer vision systems comprised only one camera, which took a pictureof the object. By processing the picture, various conclusions could bedrawn from it. By using different algorithms, it is possible todistinguish different levels in images on the basis of theirborderlines. The borderlines are identified on the basis of intensityconversion. Another method of recognizing shapes in an image is toconnect it to masks and filters so that only certain types of pointswill be distinguished from the image. The patterns formed by the pointsin the image can be compared to models in a database and thusrecognized.

In a truly three-dimensional computer vision system, several cameras areneeded. To determine a three-dimensional coordinate, an image of thesame point is needed from at least two cameras. The points are usuallyformed on the surface of the object via illumination. The illuminationis typically implemented using a laser. The point is imaged by camerascalibrated in the same coordinate system. When an image of the point canbe produced by at least two cameras, it is possible to determinethree-dimensional coordinates for the point. For the same position, anumber of points are measured. The set of points thus formed is called apoint cloud.

The object to be measured can be placed on a movable support, e.g. arotating table. ‘Rotating table’ means a support that rotates about itsaxis. If the object can be rotated, then the camera system need not beable to measure the entire object from one position and normally fewercameras are needed than when measurements are carried out with theobject on a fixed support. The movable support may also be a carriermoving on rails.

To carry out measurements, the computer vision system has to becalibrated because the positions of the cameras or the lens errorparameters are not known. Calibration refers to an operation whereby theconnected between the two-dimensional image coordinates of the points asperceived by the cameras and the three-dimensional coordinates obtainedas a result are determined.

Camera systems are typically calibrated by measuring calibration pointsin the visual field of the cameras and using calibration piecescomprising a number of three-dimensional points. A calibration procedureis described in Finnish patent no. 74556. The accuracy requirementsconcerning camera systems and calibration vary depending on theapplication. The calibration of a camera system is a problem ofnonlinear nature, so the mathematical models behind it are complicated,e.g. because of lens errors. Different calibration methods are describede.g. in an article entitled “Geometric Camera Calibration Using CircularControl Points” in the October 2000 issue of the periodical “IEEETransactions On Pattern Analysis And Machine Intelligence”.

Complicated mathematical models are difficult to manage. On the otherhand, simplifying the models too much impairs the calibration accuracy.Moreover, in most methods it is assumed that the views perceived by thecameras are unbiased and that the only error appearing in them is theevenly distributed random noise. These problems can be reduced bymodifying the mathematical model, but typically this leads to a morecomplicated model or excessive deterioration of accuracy. However, lenserrors and other sources of error inherent with the camera can not becompletely eliminated.

OBJECT OF THE INVENTION

The object of the invention is to eliminate the above-mentioneddrawbacks or at least to significantly alleviate them. A specific objectof the invention is to disclose a new type of method and system forcalibrating a computer vision system, thereby eliminating the need forlaborious three-dimensional calibration measurements or complicated andexpensive calibration pieces.

BRIEF DESCRIPTION OF THE INVENTION

The present invention concerns a method and a system for calibrating acomputer vision system. The system consists of cameras, a calibrationpiece, a support plate and a data system.

The system of the invention is based on a calibration piece providedwith focusing marks. The focusing marks are ordinary two-dimensionalmarks on the surface of the calibration piece. Typical focusing marksused consist of circles. The calibration piece need not comprise anyspecific three-dimensional shapes. The distance between at least twofocusing marks on the calibration piece is measured as precisely aspossible. However, more important than measuring precision is that thedistance between the focusing marks should remain unchanged duringcalibration, because the absolute distance between the marks can anywaybe controlled after calibration. If necessary, several calibrationpieces may be used in the same calibration operation or the distancebetween the focusing marks can be adjusted by means of a mechanismresembling a micrometer screw, but this imposes great requirements onthe calibration pieces to ensure that they always represent the samescale to be traced. In principle, it is sufficient to define thedistance between two points by any method during calibration, but inpractice a simple way is to use a calibration piece. To ensure that thedistance between the focusing marks remains unchanged, the calibrationpiece is made of e.g. carbon fiber, invar metal or some other materialhaving a good retention of properties. The calibration piece istypically shaped like a bar, but especially a calibration piece withseveral focusing marks may also have a polygonal shape. It is notnecessary to know the distances between all focusing marks on thecalibration piece, but at least one distance has to be known. Thisdistance alone or together with other known distances between focusingmarks on the calibration piece determines the scale of the system to becalibrated. In calibration according to this method, it is possible todefine all conversion parameters except the scale from two-dimensionalto three-dimensional and vice versa exclusively on the basis ofindividual common points seen by the cameras. Calibration performedwithout even one of the distances makes it possible to determine theshape and internal dimensions of an object, but its absolute size willremain unknown.

The mathematical minimum number of calibration points is five, but inpractice, e.g. for the determination of lens errors, more calibrationpoints are needed. Furthermore, the distance between at least two of allthe points must be known, but in practice, even so it is advantageous toknow more than one distance. In a typical calibration situation, thecalibration piece is placed on a support plate so that at least twocameras can see it. Next, the two-dimensional image coordinates of thefocusing marks are measured. This step is repeated by moving thecalibration piece to several different positions. In their basic form,calibration measurements only comprise these steps, but it is possibleto add several other steps to the calibration procedure. For example, iffixed calibration points have been added to the system in order todetermine the directions of coordinate axes, those points are measuredas well. Instead of circular marks, it is also possible to use othermarks. In many cases, individual points are measured whose mutualdistances are unknown but which, if seen simultaneously by severalcameras, are useful in the determination of the mutual positions andlens errors of the cameras. Focusing marks may also be placed onsurfaces known to be planar, in which case the information regarding thepositions of the points on the plane can be utilized in the calibrationcalculation. The calibration points need not consist of focusing marks;instead, they may be e.g. light spots.

After all the measurements of calibration points with the cameras havebeen made, calibration calculation is carried out. In this calculation,parameters pertaining to the camera system are determined, such as e.g.the mutual positions of the cameras in space and the magnitude of lenserrors. As appears from the above description, the essential initialinformation required only comprises the two-dimensional imagecoordinates of focusing marks simultaneously seen by the cameras. Afterthis, if desirable, the camera positions may be measured or input with areasonable accuracy. In the calibration calculation, the scale of thespace seen by the cameras is calculated from the three-dimensionaldistance between at least two points on the calibration piece. Finally,the calibration parameters are saved in memory. Fixed calibration piecesattached to the support can be utilized in fast re-calibration. Ifnecessary, re-calibration can be arranged to be carried outautomatically in connection with the actual measurement.

The invention facilitates the calibration of three-dimensional machinevision systems. Using the invention, machine vision systems can becalibrated without complicated mathematical procedures. In the method ofthe invention, the system is calibrated without any reference piecescontaining three-dimensional points or any previously measuredthree-dimensional points, the placement or measurement of which is inmany cases difficult and expensive, if not even impossible. In addition,calibration of a machine vision system performed using a calibrationpiece according to the invention is a fast operation.

LIST OF FIGURES

In the following, the invention will be described in detail withreference to embodiment examples, wherein

FIG. 1 presents a functional diagram representing the method of theinvention, and

FIG. 2 presents an embodiment of the system of the invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 presents a diagram visualizing the operation of a methodaccording to a preferred embodiment of the invention. At the beginningof the measurement, a calibration piece is placed on a support plate,step 10. The calibration piece is so positioned on the plate that atleast two cameras can see it. Calibration is started by measuring thefocusing marks on the calibration piece, step 11. In this example, thefocusing marks are circles drawn on the surface of the plate-like piece.When the focusing marks are measured with the cameras, they appear asellipses unless the camera is positioned perpendicularly above thefocusing mark.

After the image coordinates of the focusing marks have been measured,using the calibration piece in several positions if required, otherobjects can also be measured if necessary, e.g. fixed calibration pointsmounted on the support plate, step 12. The fixed calibration points areutilized in recalibrations, which are arranged to be carried outautomatically if necessary. If fixed calibration points have beenmounted on the support plate, they are measured, step 13.

After the measurement of the points, approximate camera positions areoften measured as this allows simpler and faster calibrationcalculation. The camera positions can be measured or input into thesystem, step 14. The positions need not be accurately determined;instead, approximate determination is sufficient.

After all the required values have been measured or input into thesystem, calibration calculation is performed using the parameters thusobtained, step 15. Finally, the calibration parameters are stored intothe memory of the system.

The system according to FIG. 2 comprises a camera system, which in theexample embodiment consists of two cameras CAM1 and CAM2, a calibrationpiece 21, a support plate 20 and a data system DTE. The calibrationpiece is provided with focusing marks 22 placed near each corner of it.In addition, fixed calibration points 23 may be placed on the supportplate 20.

To implement a three-dimensional computer vision system, at least twocameras CAM1 and CAM2 are needed, but more than two cameras can be used.TypicaIly, four to eight cameras are used. The cameras are connected tothe data system, which serves to control the operation of the camerasand perform the actual calibration calculations.

In the calibration system of the invention, a calibration piece 21 isplaced on a support plate 20. The calibration piece used here is apolygon in which each edge has a different length. As the edges havedifferent lengths, it is easy to determine the orientational position ofthe piece because the focusing marks form an unsymmetrical pattern. Thefocusing marks 22 are placed at the corners of the calibration piece.The focusing marks consist of circular patterns. The distance betweenthe marks has been measured exactly. The marks are placed at the corners21 of the calibration piece, which is made of special material. Arequirement regarding the special material is that it should haveinvariable properties. The shape of the calibration piece 21 must notchange e.g. in consequence of thermal expansion. Suitable materials formaking the calibration piece are e.g. invar metal and carbon fiber. Theessential point is that the distances between the focusing marks 22remain constant.

In connection with the calibration, the positions of fixed focusingmarks 23 attached to the support plate 20 are determined. The focusingmarks are utilized in fast re-calibrations. The system can bere-calibrated automatically, e.g. after a given number of measurementshas been reached. Re-calibration is needed e.g. for ascertaining thepositions of the cameras and the support plate. However, the distancebetween the focusing marks 23 placed on the support plate 20 may changewith time for one reason or another. Because of this, calibration shouldbe performed again from time to time using a calibration piece.

The invention is not limited to the embodiment examples described above;instead, many variations are possible within the scope of the inventiveconcept defined in the claims.

1. Method for the calibration of a three-dimensional computer visionsystem, said method comprising the steps of: measuring with camerascalibration points seen by at least two cameras at a time; andcalculating calibration parameters from points seen by at least twocameras on the basis of their two-dimensional image coordinates, whereinthe method further comprises the steps of: arranging the requiredcalibration points so that the mutual distance between at least two ofall the calibration points is known, wherein said mutual distance isused in determining scale of the space; measuring the two-dimensionalimage coordinates of the calibration points by means of the cameras;calculating conversion parameters for the conversion of thetwo-dimensional image coordinates into three-dimensional coordinates andcalculating the scale of the three-dimensional coordinate system usingat least one known distance in the calibrated space.
 2. Method accordingto claim 1, wherein a calibration piece is used for determining thedistances between the calibration points.
 3. Method according to claim1, wherein the method further comprises the steps of: calculating theorientational position of the calibration piece in some or all of thelocations where it is placed during calibration; and the orientationalposition data is utilized in the calibration calculation.
 4. Methodaccording to claim 1, wherein focusing marks consisting of circles areused.
 5. Method according to claim 1, wherein the coordinates offocusing marks on a fixed or removable piece mounted in the field ofvision of the cameras are measured.
 6. Method according to claim 1,wherein the cameras are re-calibrated by using the focusing marks on afixed or removable piece mounted in the field of vision of the cameras.7. Method according to claim 1, wherein the known three-dimensionalcoordinates are converted into two-dimensional image coordinates. 8.System for the calibration of a three-dimensional computer visionsystem, said system comprising: a camera system (CAM1, CAM2); a datasystem (DTE); and a support plate (20) wherein the system furthercomprises a planar calibration piece (21), wherein said planarcalibration piece comprises calibration points arranged so that themutual distance between at least two of all the calibration points isknown, wherein said mutual distance is used in determining scale of thespace for three-dimensional coordinates converted from two-dimensionalimage coordinates.
 9. System according to claim 8, wherein the camerasystem (CAM1, CAM2) comprises at least two cameras.
 10. System accordingto claim 8, wherein the calibration piece (21) is made of a materialwhose properties remain constant when the conditions in the measuringenvironment change.
 11. System according to claim 8, wherein thecalibration piece (21) is a polygon.
 12. System according to claim 11,wherein the edges of the calibration piece (21) have different lengths.13. System according to claim 8, wherein the calibration piece (21) isprovided with focusing marks (22) placed near its vertices.
 14. Systemaccording to claim 8, wherein the calibration piece (21) is providedwith focusing marks (22) placed near its vertices and the mutualgeometry of the focusing marks is unsymmetrical.
 15. System according toclaim 8, wherein the system comprises a fixed or removable piece (23)mounted on the support plate (20) and containing focusing marks. 16.System according to claim 8, wherein the data system (DTE) has beenfitted to perform the calibration calculations.